package ai.people.netmon.msgsearch.service;

import ai.people.netmon.framework.domain.searchmsg.request.AccountRequestToSpeak;
import ai.people.netmon.framework.domain.searchmsg.request.MessageRequest;
import ai.people.netmon.framework.domain.searchmsg.vo.AccountSpeakingLabelResponse;
import ai.people.netmon.framework.domain.searchmsg.vo.EsMessageDetailVO;
import ai.people.netmon.framework.model.response.Result;

import java.io.IOException;
import java.util.List;

/**
 * es搜索服务
 *
 * @author yuanqinglong
 * @date 2022/1/21 11:39
 */
public interface EsSearchService {


    /**
     * 搜索
     *
     * @param messageRequest 消息请求
     * @param or
     * @return {@link Result}
     */
    Result search(MessageRequest messageRequest, boolean or);


    /**
     * 搜索详情
     *
     * @param id       id
     * @param platform 平台
     * @return {@link EsMessageDetailVO}
     */
    EsMessageDetailVO searchDetail(String id, String platform) throws IOException;


    /**
     * 查询账号预警言论统计
     *
     * @param accountRequestToSpeak 帐户请求说话
     * @return {@link List}<{@link AccountSpeakingLabelResponse}>
     * @throws IOException ioexception
     */
    List<AccountSpeakingLabelResponse> queryAccountWarningRemarksCount(AccountRequestToSpeak accountRequestToSpeak) throws IOException;


}
